package com.vdong.trade.trading.respository;

import com.vdong.trade.trading.entity.dto.result.MoneyAndCountResultDTO;
import com.vdong.trade.trading.entity.po.SettlementTotalParamDTO;
import com.vdong.trade.trading.entity.po.WithdrawParamDTO;
import com.vdong.trade.trading.entity.mo.*;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface WithdrawMOMapper {
    /**
     * 将数据插入到数据库
     *
     * @param withdraw
     * @return 返回成功新增的个数
     */
    int insertWithdraw(WithdrawMO withdraw);

    /**
     * 根据ID删除数据
     *
     * @param id
     * @return 返回成功删除记录的个数
     */
    int deleteWithdrawById(Long id);

    /**
     * 根据ID修改数据
     *
     * @param id
     * @return 返回成功修改记录的个数
     */
    int updateWithdrawById(WithdrawMO withdraw);

    /**
     * 根据ID查询数据
     *
     * @param id
     * @return 返回成功查询记录
     */
    WithdrawMO selectWithdrawById(Long id);

    /**
     * 根据条件查询数据
     *
     * @param withdraw
     * @return 返回查询的记录列表
     */
    List<WithdrawMO> selectWithdrawListByCond(WithdrawMO withdraw);

    /**
     * 根据条件查询数据的条数
     *
     * @param withdraw
     * @return 返回查询的记录条数
     */
    Integer selectWithdrawCntByCond(WithdrawMO withdraw);

    List<WithdrawRecordListMO> selectWithdrawRecordList(WithdrawParamDTO param);

    WithdrawDetailMO selectWithdrawDetail(WithdrawParamDTO param);

    List<WithdrawApplyListMO> selectWithdrawApplyList(WithdrawParamDTO param);

    WithdrawApplyDetailMO selectWithdrawApplyDetail(WithdrawParamDTO param);

    List<TransferApplyListMO> transferApplyList(SettlementTotalParamDTO param);

    List<TransferConfirmOrRefuseMO> transferConfirmOrRefuse(SettlementTotalParamDTO param);

    List<TransferRecordListMO> transferRecordList(SettlementTotalParamDTO param);

    TransferRecordDetailMO transferRecordDetail(SettlementTotalParamDTO param);

    /**
     * 根据参数修改数据
     *
     * @param withdrawAuditMO
     * @return 返回成功修改记录的个数
     */
    int updateWithdrawByParam(WithdrawAuditMO withdrawAuditMO);

    MoneyAndCountMO moneyAndCount(SettlementTotalParamDTO param);

    /**
     * 根据条件查询数据条数
     * @param withdrawAuditMO
     * @return
     */
    Integer selectWithdrawCount(WithdrawAuditMO withdrawAuditMO);
}